<template>
  <div class="app-container">
    <van-nav-bar
      :title="this.$route.meta.title"
      :left-arrow="this.$route.meta.isback"
      @click-left="onClickLeft"
      fixed
    />

    <router-view></router-view>

    <van-tabbar v-if="this.$route.meta.showtab" active-color="#fa5151" fixed route>
      <van-tabbar-item replace to="/home" icon="wap-home">首页</van-tabbar-item>
      <van-tabbar-item replace to="/order" icon="shop">订单</van-tabbar-item>
      <van-tabbar-item to="/my" icon="manager">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'app',
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less" scoped>
.viewsContainer {
  padding: 50px 0 55px 0;
  background-color: #f2f2f2;
}
.componentsContainer {
  padding: 50px 0 0 0;
  background-color: #f2f2f2;
}
</style>

<style lang="less">
* {
  padding: 0;
  margin: 0;
}
li {
  list-style: none;
}
.app-container {
  height: 100%;
}
</style>